//
//  SEGUhomeMediator+SEGStandard.m
//  SEGBasicBussiness
//
//  Created by 刘山 on 2018/3/13.
//  Copyright © 2018年 刘山. All rights reserved.
//

#import "SEGUhomeMediator+SEGStandard.h"

NSString * const kTargetLogin = @"Login";
NSString * const kActionLogininitLoginViewController = @"initLoginViewController";
NSString * const kActionLogininitSelectCommunityViewController = @"initSelectCommunityViewController";
NSString * const kActionLoginInitChangePasswordViewController = @"initChangePasswordViewController";
NSString * const kActionLoginInitSEGChangePhoneNumberViewController = @"initSEGChangePhoneNumberViewController";
NSString * const kActionLoginInitSEGChangeCommunityViewController = @"initChangeCommunityViewController";
static NSString * const kActionLoginInitSEGLogoutViewController = @"initSEGLogoutViewController";

NSString * const kTargetNewVersion = @"NewVersion";
NSString * const kActionNewVersioninitNewVersionViewController = @"initNewVersionViewController";

NSString * const kTargetNaviTab = @"NaviTab";
NSString * const kActionNaviTabShowCustomProgressImage = @"showCustomProgressImage";
NSString * const kActionNaviTabHiddenCustomProgressImage = @"hiddenCustomProgressImage";
NSString * const kActionNaviPushToMainViewController = @"pushToMainViewController";
NSString * const kActionNaviPushToMainViewControllerThroughInterface = @"pushToMainViewControllerThroughInterface";
NSString * const kActionNaviPushToMainViewControllerThroughInterfaceV2 = @"pushToMainViewControllerThroughInterfaceV2";
NSString * const kActionNaviPushToLoginViewController = @"pushToLoginViewController";
NSString * const kActionNaviPushToNewVersionViewController = @"pushToNewVersionViewController";
NSString * const kActionNaviActionToViewController = @"pushToViewControllerWithAction";
NSString * const kActionNaviTypeToViewController = @"pushToViewControllerWithType";
NSString * const kActionNaviPushToViewControllerWithScheme = @"pushToViewControllerWithScheme";
NSString * const kActionNaviTypeToViewControllerWithRemoteNotification = @"pushToViewControllerWithRemoteNotification";
NSString * const kActionPushToViewControllerWithMessageType = @"pushToViewControllerWithMessageType";
NSString * const kActionNaviTabSubmitJpushToken = @"submitJpushToken";
NSString * const kActionNaviTabInitJpushWithOptions = @"initJpushWithOptions";
NSString * const kActionNaviTabRequestGetPushTag= @"requestGetPushTag";
//NSString * const kActionNaviTabfrshItemShow = @"frshItemShow";
NSString * const kActionNaviGetCurrentController = @"getCurrentController";
NSString * const kActionNaviselctedToTabParams = @"selctedToTabParams";
NSString * const kActionAutoNaviselctedToTabParams = @"autoSelctedToTabParams";
NSString * const kActionNaviShowOpenDoorView = @"showOpenDoorView";

NSString * const kTargetWeb = @"Web";
NSString * const kActionWebInitWebViewLoadController = @"initWebViewLoadController";
NSString * const kActionTabWebInitWebViewLoadController = @"initTabWebViewLoadController";
NSString * const kActionWebGetWebViewLoadControllerClass = @"getWebViewLoadControllerClass";
NSString * const kActionWebControllerReloadData = @"reloadWebViewData";

NSString * const kTargetUserFeedback = @"UserFeedback";
NSString * const kActionUserFeedbackFeedbackDetailViewController = @"initFeedbackDetailViewController";
NSString * const kActionUserFeedbackUserFeedbackViewController = @"initUserFeedbackViewController";

NSString * const kTargetInvite = @"Invite";
NSString * const kActionInviteInitInviteRecordViewController = @"initInviteRecordViewController";
NSString * const kActionInviteInitInviteViewController = @"initInviteViewController";
NSString * const kActionInviteInitPhoneRechargeViewController = @"initPhoneRechargeViewController";
NSString * const kActionInviteInitSEGInviteQRCodeViewController = @"initSEGInviteQRCodeViewController";

NSString * const kTargetSetting = @"Setting";
NSString * const kActionSettingInitSettingViewController = @"initSettingViewController";

NSString * const kTargetCollection = @"Collection";
NSString * const kActionCollectionInitMyCollectionViewController = @"initMyCollectionViewController";

NSString * const kTargetPersonalHomePage = @"PersonalInfo";

NSString * const kActionPersonalHomePageInitSEGCompleteGenderInfoViewController = @"initSEGCompleteGenderInfoViewController";
NSString * const kActionPersonalHomePageInitSEGMyLevelViewController = @"initSEGMyLevelViewController";
NSString * const kActionPersonalHomePageInitSEGAdressListViewController = @"initSEGAdressListViewController";
NSString * const kActionPersonalHomePageInitSEGMyProfileViewController = @"initSEGMyProfileViewController";


NSString * const kTargetMenuList = @"MenuList";
NSString * const kActionMenuListInitMenuListViewController = @"initMenuListViewController";
NSString * const kActionMenuListInitMyRootViewController = @"initMyRootViewController";
NSString * const kActionMenuListInitServiceViewController = @"initServiceViewController";
NSString * const kActionMenuListInitMainViewController = @"initMainViewController";
NSString * const kActionMenuListInitMenuChildListViewController = @"initMenuChildListViewController";
NSString * const kActionMenuListInitMenuCommunityViewController = @"initMenuCommunityViewController";
NSString * const kActionMenuListInitUsualMenuViewController = @"initUsualMenuViewController";

NSString * const kTargetWalletFramework = @"WalletFramework";

NSString * const kTargetMessage = @"Message";
NSString * const kActionMessageInitMessageRootViewController = @"initMessageRootViewController";
NSString * const kActionMessageInitOrderMessageViewController = @"initOrderMessageViewController";
NSString * const kActionMessageInitSessionMessageViewController = @"initSessionMessageViewController";
NSString * const kActionMessageInitWayCarSessionMessageViewController = @"initWayCarSessionMessageViewController";
NSString * const kActionMessageInitOldActivityMessageViewController = @"initOldActivitySessionMessageViewController";
NSString * const kActionMessageGetMessageViewControllerClass = @"getMessageViewControllerClass";


NSString * const kTargetAdvertisement = @"Advertisement";
NSString * const kActionAdvertisementshowLaunchAndPopWindowAdvertisement = @"showLaunchAndPopWindowAdvertisement";

NSString * const kLottery = @"Lottery";

static NSString * const kTargetFaceRecognition = @"FaceRecognition";
static NSString * const kActionInitFaceRecognitionViewController = @"initFaceRecognitionViewController";

@implementation SEGUhomeMediator (SEGStandard)

/**
 * 初始化用户反馈回复界面
 * @author Sam
 */
-(UIViewController*)seg_initFeedbackDetailViewController:(NSDictionary*)params{
    return [self performTarget:kTargetUserFeedback action:kActionUserFeedbackFeedbackDetailViewController params:params shouldCacheTarget:NO];
}

/**
 * 初始化产品反馈界面
 * @author Sam
 */
-(UIViewController*)seg_initUserFeedbackViewController:(NSDictionary*)params{
    return [self performTarget:kTargetUserFeedback action:kActionUserFeedbackUserFeedbackViewController params:params shouldCacheTarget:NO];
}

/**
 * 初始化登录界面
 * @author Sam
 * @param params  参数
 * @return UIViewController
 */
-(UIViewController*)seg_initLoginViewController:(NSDictionary*)params{
    return [self performTarget:kTargetLogin action:kActionLogininitLoginViewController params:params shouldCacheTarget:NO];
}

-(void)seg_EnterAppRequestLogic:(NSDictionary*)params{
    [self performTarget:kTargetLogin action:@"EnterAppRequestLogic" params:params shouldCacheTarget:NO];
}

/**
 * 初始化百度地图
 * @author Sam
 * @param params  跳转参数
 */
-(UIViewController*)seg_initBMKLocationKit:(NSDictionary*)params{
    return [self performTarget:kTargetLogin action:@"initBMKLocationKit" params:params shouldCacheTarget:NO];
}

/**
 * 修改密码
 * @author Sam
 * @param params  跳转参数
 */
-(UIViewController*)seg_initChangePasswordViewController:(NSDictionary*)params{
    return [self performTarget:kTargetLogin action:kActionLoginInitChangePasswordViewController params:params shouldCacheTarget:NO];
}

/**
 * 修改号码
 * @author Sam
 * @param params  跳转参数
 */
-(UIViewController*)seg_initSEGChangePhoneNumberViewController:(NSDictionary*)params{
    return [self performTarget:kTargetLogin action:kActionLoginInitSEGChangePhoneNumberViewController params:params shouldCacheTarget:NO];
}

/// 注销账号
/// @param params 跳转参数
- (UIViewController *)seg_initSEGLogoutViewController:(NSDictionary *)params {
    return [self performTarget:kTargetLogin
                        action:kActionLoginInitSEGLogoutViewController
                        params:params
             shouldCacheTarget:NO];
}

/**
 * 初始化切换小区界面
 * @author Sam
 * @param params  参数
 * @return UIViewController
 */
-(UIViewController*)seg_initSelectCommunityViewController:(NSDictionary*)params{
    return [self performTarget:kTargetLogin action:kActionLogininitSelectCommunityViewController params:params shouldCacheTarget:NO];
}

/**
 * 初始化切换小区
 * @author Sam
 * @param params  跳转参数
 */
-(UIViewController*)seg_initChangeCommunityViewController:(NSDictionary*)params{
    return [self performTarget:kTargetLogin action:kActionLoginInitSEGChangeCommunityViewController params:params shouldCacheTarget:NO];
}

/**
 * 初始化新特性界面
 * @author Sam
 * @param params  参数
 * @return UIViewController
 */
-(UIViewController*)seg_initNewVersionViewController:(NSDictionary*)params{
    return [self performTarget:kTargetNewVersion action:kActionNewVersioninitNewVersionViewController params:params shouldCacheTarget:NO];
}

/**
 * 检测新版本
 * @author Sam
 */
-(void)seg_checkVersion:(NSDictionary*)params{
    [self performTarget:kTargetNewVersion action:@"checkVersion" params:params shouldCacheTarget:NO];
}

/**
 * 检查是否有新的版本
 * @author Sam
 */
-(NSString*)seg_compareVersion:(NSDictionary*)params{
    return [self performTarget:kTargetNewVersion action:@"compareVersion" params:params shouldCacheTarget:NO];
}

/**
 * 检查是否有新的版本并且进行跳转
 * @author Sam
 */
-(void)seg_compareVersionAndPush:(NSDictionary*)params{
    [self performTarget:kTargetNewVersion action:@"compareVersionAndPush" params:params shouldCacheTarget:NO];
}

/**
 * 显示遮罩层
 * @author Sam
 * @param params  参数
 */
-(void)seg_showCustomProgressImage:(NSDictionary*)params{
    [self performTarget:@"Toast" action:kActionNaviTabShowCustomProgressImage params:params shouldCacheTarget:NO];
}

/**
 * 隐藏遮罩层
 * @author Sam
 * @param params  参数
 */
-(void)seg_hideCustomProgressImage:(NSDictionary*)params{
    [self performTarget:@"Toast" action:kActionNaviTabHiddenCustomProgressImage params:params shouldCacheTarget:NO];
}
/**
 * 通过接口请求执行登录流程操作
 * @author Sam
 */
-(void)seg_pushToMainViewControllerThroughInterface:(NSDictionary*)params{
    [self performTarget:@"Login" action:kActionNaviPushToMainViewControllerThroughInterface params:params shouldCacheTarget:NO];
}

/**
 * 通过接口请求执行登录流程操作
 * @author Sam
 */
-(void)seg_pushToMainViewControllerThroughInterfaceV2:(NSDictionary*)params{
    [self performTarget:@"Login" action:kActionNaviPushToMainViewControllerThroughInterfaceV2 params:params shouldCacheTarget:NO];
}


/**
 * 跳转到主界面
 * @author Sam
 */
-(void)seg_pushToMainViewController:(NSDictionary*)params{
    [self performTarget:@"TabBars" action:kActionNaviPushToMainViewController params:params shouldCacheTarget:NO];
}

/**
 * 跳转到登录界面
 * @author Sam
 */
-(void)seg_pushToLoginViewController:(NSDictionary*)params{
    [self performTarget:@"Login" action:kActionNaviPushToLoginViewController params:params shouldCacheTarget:NO];
}

/**
 * 跳转到新特性界面
 * @author Sam
 */
-(void)seg_pushToNewVersionViewController:(NSDictionary*)params{
    [self performTarget:@"NewVersion" action:kActionNaviPushToNewVersionViewController params:params shouldCacheTarget:NO];
}

/**
 * 项目中跳转到任意界面
 * @author Sam
 */
-(void)seg_pushToViewControllerWithAction:(NSDictionary*)params{
    [self performTarget:@"Login" action:kActionNaviActionToViewController params:params shouldCacheTarget:NO];
}

/**
 * 项目中跳转到任意界面
 * @author Sam
 */
-(void)seg_pushToViewControllerWithType:(NSDictionary*)params{
    [self performTarget:@"Login" action:kActionNaviTypeToViewController params:params shouldCacheTarget:NO];
}

/**
 * 添加网页跳转原生界面
 * @author Sam
 * @version 4.6.0
 */
-(void)seg_pushToViewControllerWithScheme:(NSDictionary *)params{
    [self performTarget:@"Login" action:@"pushToViewControllerWithScheme" params:params shouldCacheTarget:NO];
}

/**
 * 根据消息跳转到对应界面
 * @author Wendy
 */
-(void)seg_pushToViewControllerWithMessageInfo:(NSDictionary*)params{
    [self performTarget:@"Message" action:kActionNaviTypeToViewControllerWithRemoteNotification params:params shouldCacheTarget:NO];
}

/**
 根据消息类型跳转对应界面 (依据type, 统一处理消息中心跳转页面)
 
 @param params 消息体
 */
- (void)seg_pushToViewControllerWithMessageType:(NSDictionary *)params {
   [self performTarget:@"Message" action:kActionPushToViewControllerWithMessageType params:params shouldCacheTarget:NO];
}

/**
 * 初始化极光推送
 * @author Wendy
 */
-(void)seg_initJpushWithOptions:(NSDictionary*)params{
    [self performTarget:@"Message" action:kActionNaviTabInitJpushWithOptions params:params shouldCacheTarget:NO];
}

/**
 * 上传极光推送token
 * @author Wendy
 */
-(void)seg_submitJpushToken:(NSDictionary*)params{
    [self performTarget:@"Message" action:kActionNaviTabSubmitJpushToken params:params shouldCacheTarget:NO];
}

/**
 * 获取极光推送要绑定的tag
 * @author Wendy
 */
-(void)seg_requestGetPushTag:(NSDictionary*)params{
    [self performTarget:@"Message" action:kActionNaviTabRequestGetPushTag params:params shouldCacheTarget:NO];
}

/**
 * 保存菜单父子关系
 * @param params  菜单模型数组
 */
- (void)seg_saveMenuList:(NSDictionary*)params{
    [self performTarget:@"Message" action:@"saveMenuList" params:params shouldCacheTarget:NO];
}

#pragma mark - 红点ID相关方法
// 获取现有的红点settingsId数组
- (NSMutableArray *)seg_getCurrentSettingIdsArray:(NSDictionary*)params{
   return [self performTarget:@"Message" action:@"getCurrentSettingIdsArray" params:params shouldCacheTarget:NO];
}

/**
 * 获取红点的Type和Rescode对应关系字典
 * @return Type和Rescode对应关系字典
 */
- (NSDictionary *)seg_getRedDotTypeAndRescodeDict:(NSDictionary*)params{
    return [self performTarget:@"Message" action:@"getRedDotTypeAndRescodeDict" params:params shouldCacheTarget:NO];
}

/**
 * 保存红点的Type对应的菜单ID
 *  @param type 推送或透传消息的type
 */
- (void)seg_saveRedDotWithType:(NSDictionary*)params{
    [self performTarget:@"Message" action:@"saveRedDotWithType" params:params shouldCacheTarget:NO];
}

/**
 *  删除Type对应的本地红点信息
 *  @param type 推送或透传消息的type
 */
- (void)seg_deleteRedDotWithType:(NSDictionary*)params{
    [self performTarget:@"Message" action:@"deleteRedDotWithType" params:params shouldCacheTarget:NO];
}

/**
 * 删除菜单ID对应的本地红点信息
 * @param idString 菜单的settingsId
 */
- (void)seg_deleteRedDotWithId:(NSDictionary*)params{
    [self performTarget:@"Message" action:@"deleteRedDotWithId" params:params shouldCacheTarget:NO];
}

/**
 * 获取所有物业服务的消息类型数组
 * @return 物业服务的消息类型数组
 */
- (NSArray *)seg_getServiceTypeArray:(NSDictionary*)params{
    return [self performTarget:@"Message" action:@"getServiceTypeArray" params:params shouldCacheTarget:NO];
}

/**
 *  获取现有的物业服务消息serviceId数组
 */
- (NSMutableArray *)seg_getMyServiceIdArray:(NSDictionary*)params{
   return [self performTarget:@"Message" action:@"getMyServiceIdArray" params:params shouldCacheTarget:NO];
}

/**
 *  保存物业服务消息的serviceId
 *  @param serviceId 推送或透传消息的serviceId
 */
- (void)seg_saveMyServiceId:(NSDictionary*)params{
    [self performTarget:@"Message" action:@"saveMyServiceId" params:params shouldCacheTarget:NO];
}

/**
 *  删除物业服务消息的serviceId
 *  @param serviceId 推送或透传消息的serviceId
 */
- (void)seg_deleteMyServiceId:(NSDictionary*)params{
    [self performTarget:@"Message" action:@"deleteMyServiceId" params:params shouldCacheTarget:NO];
}

/**
 * 网页初始化
 * @author Helen
 */
-(UIViewController *)seg_initWebViewLoadController:(NSDictionary*)params{
   return [self performTarget:kTargetWeb action:kActionWebInitWebViewLoadController params:params shouldCacheTarget:NO];
}

/**
 * tab网页初始化
 * @author lima
 */
-(UIViewController *)seg_initTabWebViewLoadController:(NSDictionary*)params {
    return [self performTarget:kTargetWeb action:kActionTabWebInitWebViewLoadController params:params shouldCacheTarget:NO];
}

/**
 * 网页初始化
 * @author Helen
 */
-(UIViewController *)seg_initWebViewLoadController:(NSDictionary*)params completed:(id(^) (id result ,NSURL * url))completed{
    NSMutableDictionary *tmp = [NSMutableDictionary dictionaryWithDictionary:params];
    [tmp setObject:completed forKey:@"completed"];
    return [self performTarget:kTargetWeb action:kActionWebInitWebViewLoadController params:tmp shouldCacheTarget:NO];
}


/**
 获取网页的类

 @return 类
 */
-(Class)seg_getWebViewLoadControllerClass {
    return [self performTarget:kTargetWeb action:kActionWebGetWebViewLoadControllerClass params:nil shouldCacheTarget:NO];
}

/**
 重载WebView的数据

 @param params 参数
 */
-(void)seg_reloadWebViewData:(NSDictionary *)params {
    [self performTarget:kTargetWeb action:kActionWebGetWebViewLoadControllerClass params:params shouldCacheTarget:NO];
}

/**
 * 显示邀请记录
 * @author Sam
 */
-(UIViewController*)seg_initInviteRecordViewController:(NSDictionary*)params{
    return [self performTarget:kTargetInvite action:kActionInviteInitInviteRecordViewController params:params shouldCacheTarget:NO];
}

/**
 * 邀请邻居
 * @author Sam
 */
-(UIViewController*)seg_initInviteViewController:(NSDictionary*)params{
    return [self performTarget:kTargetInvite action:kActionInviteInitInviteViewController params:params shouldCacheTarget:NO];
}

/**
 * 跳转到话费充值 turnTip
 * @author Sam
 */
-(UIViewController*)seg_initPhoneRechargeViewController:(NSDictionary*)params{
    return [self performTarget:kTargetInvite action:kActionInviteInitPhoneRechargeViewController params:params shouldCacheTarget:NO];
}

/**
 * 邀请邻居-二维码下载APP
 * @author Sam
 */
-(UIViewController*)seg_initSEGInviteQRCodeViewController:(NSDictionary*)params{
    return [self performTarget:kTargetInvite action:kActionInviteInitSEGInviteQRCodeViewController params:params shouldCacheTarget:NO];
}

/**
 * 初始化设置界面
 * @author Sam
 */
-(UIViewController*)seg_initSettingViewController:(NSDictionary*)params{
    return [self performTarget:kTargetSetting action:kActionSettingInitSettingViewController params:params shouldCacheTarget:NO];
}

/**
 * 我的收藏
 * @author Sam
 */
-(UIViewController*)seg_initMyCollectionViewController:(NSDictionary*)params{
return [self performTarget:kTargetCollection action:kActionCollectionInitMyCollectionViewController params:params shouldCacheTarget:NO];
}




/**
 * 菜单界面
 * @author Sam
 */
-(UIViewController*)seg_initMenuListViewController:(NSDictionary*)params{
    return [self performTarget:kTargetMenuList action:kActionMenuListInitMenuListViewController params:params shouldCacheTarget:NO];
}

/**
 渤海支付钱包入口
 @author Sam
 */
-(void)seg_pushToWallet:(NSDictionary*)params {
    [self performTarget:kTargetWalletFramework action:@"pushToWallet" params:params shouldCacheTarget:NO];
}

/**
 消费
 @author Sam
 */
-(void)seg_BoHaiPayWithParams:(NSDictionary*)params callBack:(void(^)(NSDictionary *responseData))callback {
    NSMutableDictionary *dicM = [NSMutableDictionary dictionaryWithDictionary:params];
    [dicM setValue:callback forKey:@"block"];
    [self performTarget:kTargetWalletFramework action:@"BoHaiPayWithParams" params:dicM shouldCacheTarget:NO];
}


/// 初始化视频监控控制器
/// @author Sam
/// @param params 参数
-(UIViewController*)seg_initHikVideoPlayerController:(NSDictionary*)params{
    return [self performTarget:@"HikVideoPlayer" action:@"initHikVideoPlayerController" params:params shouldCacheTarget:NO];
}

/**
 * 菜单界面-我的
 * @author Sam
 */
-(UIViewController*)seg_initMyRootViewController:(NSDictionary*)params{
    UIViewController*vc = [self performTarget:kTargetMenuList action:kActionMenuListInitMyRootViewController params:params shouldCacheTarget:NO];
    return vc ? vc : [[UIViewController alloc]init];
}

/**
 * 菜单界面-服务
 * @author Sam
 */
-(UIViewController*)seg_initServiceViewController:(NSDictionary*)params{
    UIViewController*vc = [self performTarget:kTargetMenuList action:kActionMenuListInitServiceViewController params:params shouldCacheTarget:NO];
    return vc ? vc : [[UIViewController alloc]init];
}

/**
 * 菜单界面-纷享
 * @author Sam
 */
-(UIViewController*)seg_initMainViewController:(NSDictionary*)params{
    UIViewController*vc = [self performTarget:kTargetMenuList action:kActionMenuListInitMainViewController params:params shouldCacheTarget:NO];
    return vc ? vc : [[UIViewController alloc]init];
}

/**
 * 菜单界面-社区
 * 2018-05-28
 * @author Sam
 */
- (UIViewController *)seg_initMenuCommunityViewController:(NSDictionary *)params {
    return [self performTarget:kTargetMenuList action:kActionMenuListInitMenuCommunityViewController params:params shouldCacheTarget:NO];
}

/**
 * 常用菜单界面
 * @author Joeyoung
 */
- (UIViewController *)seg_initUsualMenuViewController:(NSDictionary *)params {
    UIViewController*vc = [self performTarget:kTargetMenuList action:kActionMenuListInitUsualMenuViewController params:params shouldCacheTarget:NO];
    return vc ? vc : [UIViewController new];
}

/**
 * 初始化个人资料 -- 完善信息
 * @author Helen
 */
-(UIViewController*)seg_initSEGCompleteGenderInfoViewController:(NSDictionary*)params{
    return [self performTarget:kTargetPersonalHomePage action:kActionPersonalHomePageInitSEGCompleteGenderInfoViewController params:params shouldCacheTarget:NO];
}

/**
 * 初始化个人资料 -- 配送地址
 * @author Helen
 */
-(UIViewController*)seg_initSEGAdressListViewController:(NSDictionary*)params{
    return [self performTarget:kTargetPersonalHomePage action:kActionPersonalHomePageInitSEGAdressListViewController params:params shouldCacheTarget:NO];
}

/**
 * 初始化 个人资料显示
 * @author Helen
 */
-(UIViewController*)seg_initMyProfileViewController:(NSDictionary*)params{
    return [self performTarget:kTargetPersonalHomePage action:kActionPersonalHomePageInitSEGMyProfileViewController params:params shouldCacheTarget:NO];
    
}

/**
 * 初始化消息列表
 * @author Wendy
 */
-(UIViewController*)seg_initMessageRootViewController:(NSDictionary*)params{
    UIViewController*vc = [self performTarget:kTargetMessage action:kActionMessageInitMessageRootViewController params:params shouldCacheTarget:NO];
    return vc ? vc : [[UIViewController alloc]init];
}

/**
 * 跳转到私聊
 * @author Sam
 */
-(UIViewController*)seg_initSessionMessageViewControllerParams:(NSDictionary*)params{
    return [self performTarget:kTargetMessage action:@"initSessionMessageViewControllerParams" params:params shouldCacheTarget:NO];
}

/// 用户登录积分成长值
- (void)seg_requestLoginIntegralGrowth:(NSDictionary *)params{
    [self performTarget:kTargetMessage action:@"requestLoginIntegralGrowth" params:params shouldCacheTarget:NO];
}

/// 用户注册积分成长值
- (void)seg_requestSignUpIntegralGrowth:(NSDictionary *)params{
    [self performTarget:kTargetMessage action:@"requestSignUpIntegralGrowth" params:params shouldCacheTarget:NO];
}

/**
 * 初始化公众号
 * @author Wendy
 * @param params  跳转参数 必传参数有messageModel
 */
- (UIViewController*)seg_initServiceMessageViewController:(NSDictionary*)params{
    return [self performTarget:kTargetMessage action:@"initServiceMessageViewController" params:params shouldCacheTarget:NO];
}


/**
 * 初始化到家服务聊天界面
 * @author Wendy
 */
-(UIViewController*)seg_initOrderMessageViewController:(NSDictionary*)params{
    return [self performTarget:kTargetMessage action:kActionMessageInitOrderMessageViewController params:params shouldCacheTarget:NO];
}

/**
 * 初始化聊天界面
 * @author Wendy
 */
-(UIViewController*)seg_initSessionMessageViewController:(NSDictionary*)params{
    return [self performTarget:kTargetMessage action:kActionMessageInitSessionMessageViewController params:params shouldCacheTarget:NO];
}

/**
 初始化拼车聊天界面
 
 @param params 参数
 @return 聊天界面VC
 */
-(UIViewController*)seg_initWayCarSessionMessageViewController:(NSDictionary*)params {
    return [self performTarget:kTargetMessage action:kActionMessageInitWayCarSessionMessageViewController params:params shouldCacheTarget:NO];
}

/**
 初始化老活动聊天界面
 
 @param params 参数
 @return 聊天界面VC
 */
-(UIViewController*)seg_initOldActivitySessionMessageViewController:(NSDictionary*)params {
    return [self performTarget:kTargetMessage action:kActionMessageInitOldActivityMessageViewController params:params shouldCacheTarget:NO];
}

/**
 获取聊天界面的Class

 @return Class
 */
-(Class)seg_getMessageViewControllerClass {
    return [self performTarget:kTargetMessage action:kActionMessageGetMessageViewControllerClass params:nil shouldCacheTarget:NO];
}

- (void)seg_initForDidRegisterForRemoteNotificationsWithDeviceToken:(NSDictionary *)params{
     [self performTarget:kTargetMessage action:@"initForDidRegisterForRemoteNotificationsWithDeviceToken" params:params shouldCacheTarget:NO];
}

- (void)seg_initForDidReceiveRemoteNotification:(NSDictionary *)params{
     [self performTarget:kTargetMessage action:@"initForDidReceiveRemoteNotification" params:params shouldCacheTarget:NO];
}

/**
 * 控制纷享刷新控件的展示和隐藏
 * @author Sam
 * @param isShow  YES 展示，NO 隐藏
 */
//-(void)seg_frshItemShow:(BOOL)isShow{
//    NSDictionary *params = @{@"isShow":@(isShow)};
//    [self performTarget:@"TabBars" action:kActionNaviTabfrshItemShow params:params shouldCacheTarget:NO];
//}

/**
 * 模态跳转启动广告
 * @author Sam
 */
-(void)seg_showLaunchAndPopWindowAdvertisement:(NSDictionary*)params{
    [self performTarget:kTargetAdvertisement action:kActionAdvertisementshowLaunchAndPopWindowAdvertisement params:params shouldCacheTarget:NO];
    
}

/**
 * 获取app最顶层的控制器
 * @author Sam
 */
-(UIViewController*)seg_getCurrentController:(NSDictionary*)params{
    return [self performTarget:@"Navi" action:kActionNaviGetCurrentController params:params shouldCacheTarget:NO];
}

/**
 * 给类包裹一层navigation
 * @author Sam
 */
-(UINavigationController*)seg_getNaviController:(NSDictionary*)params{
    return [self performTarget:@"Navi" action:@"getNaviController" params:params shouldCacheTarget:NO];
}

/**
 初始化等待页面
 */
-(UIViewController*)seg_initWaitingViewController:(NSDictionary*)params{
    UIViewController* vc = [self performTarget:@"Navi" action:@"initWaitingViewController" params:params shouldCacheTarget:NO];
    if (!vc) vc = [UIViewController new];
    return vc;
}

/**
 * 跳转到指定Tab项
 * @author Sam
 */
-(void)seg_selctedToTabWithAction:(NSString*)action{
    if (!action ||action.length <=0) return;
    NSDictionary *params = @{@"action":action};
    [self performTarget:@"TabBars" action:kActionNaviselctedToTabParams params:params shouldCacheTarget:NO];
}

/**
 * 自动跳转到指定Tab项 暂时只支持消息
 * @author lima
 */
-(void)seg_autoSelctedToTabWithAction:(NSString*)action {
    if (!action ||action.length <=0) return;
    NSDictionary *params = @{@"action":action};
    [self performTarget:@"TabBars" action:kActionAutoNaviselctedToTabParams params:params shouldCacheTarget:NO];
}

/**
 * 跳转到开门界面
 * @author Sam
 */
-(void)seg_showOPenDoorViewWithAction:(NSString*)action{
//    if (!action ||action.length <=0) return;
//    NSDictionary *params = @{@"action":action};
    [self performTarget:@"TabBars" action:kActionNaviShowOpenDoorView params:nil shouldCacheTarget:NO];
}

/**
 * 菜单界面-子菜单界面
 * @author Sam
 */
-(UIViewController*)seg_initMenuChildListViewController:(NSDictionary*)params{
    return [self performTarget:kTargetMenuList action:kActionMenuListInitMenuChildListViewController params:params shouldCacheTarget:NO];
}

/**
 * 菜单界面-子菜单界面
 * @author Sam
 */
-(UIViewController*)seg_initOldPGCViewController:(NSDictionary*)params{
    return [self performTarget:kTargetMenuList action:@"initOldPGCViewController" params:params shouldCacheTarget:NO];
}

/**
 * 活动
 * @author Sam
 * @param params  参数
 */
-(void)seg_dealWithCheckActivityResultDict:(NSDictionary*)params{
    [self performTarget:kLottery action:@"dealWithCheckActivityResultDict" params:params shouldCacheTarget:NO];
}

/**
 * 活动
 * @author Sam
 * @param params  参数
 */
-(void)seg_showRedWalletViewWithType:(NSDictionary*)params{
    [self performTarget:kLottery action:@"showRedWalletViewWithType" params:params shouldCacheTarget:NO];
}

/// 人脸识别
/// @param params 入参
- (UIViewController *)seg_initFaceRecognitionViewController:(NSDictionary *)params {
   return [self performTarget:kTargetFaceRecognition
                       action:kActionInitFaceRecognitionViewController
                       params:params
            shouldCacheTarget:NO];
}

//分享组件封装
-(UIViewController*)seg_initShareViewController:(NSDictionary*)params
                                           actionType:(void(^)(NSInteger actionType))actionType
                                           channel:(void(^)(NSString* channel))channel{
    
    NSMutableDictionary *tmp = [NSMutableDictionary dictionaryWithDictionary:params];
    if (actionType) [tmp setValue:actionType forKey:@"actionTypeBlock"];
    if (channel) [tmp setValue:channel forKey:@"channelBlock"];
    
    return [self performTarget:@"Share" action:@"initShareViewController" params:tmp shouldCacheTarget:NO];
}

/**
 * 企业认证入口
 * @author Sam
 */
-(UIViewController *)seg_initApplyAuthorViewController:(NSDictionary *)params{
    return [self performTarget:@"SEGApplyAuthor"
                        action:@"initApplyAuthorViewController"
                        params:params
             shouldCacheTarget:NO];
}

/**
 * 员工管理入口
 * @author Sam
 */
-(UIViewController *)seg_initManageEmployeeViewController:(NSDictionary *)params{
    return [self performTarget:@"SEGApplyAuthor"
                        action:@"initManageEmployeeViewController"
                        params:params
             shouldCacheTarget:NO];
}
@end
